#include "StdAfx.h"
#include "SubEntity.h"
#include "Entity.h"

VAMPIRE_NAMESPACE_BEGIN

void SubEntity::draw()
{
	//mpParentEntity->setTransformMatrix();
	//gpDevice->SetMaterial(&(mMaterial->mRPG.mD3DMaterial));
	//gpDevice->SetTexture(0, mMaterial->mpTexturePtr->getTextureData());
	//Matrix44 mat = getWorldTransforms();
	mpSubMesh->draw();
}

void SubEntity::setSubMesh( SubMesh* sm )
{
	mpSubMesh = sm;
}

const Matrix44& SubEntity::getWorldTransforms() const
{
	return mpParentEntity->getAttachedNode()->getWorldTransformMatrix();
}

VAMPIRE_NAMESPACE_END
